<template>
  <div class="wrapper">
    <web :style = "webStyle" :src="src"></web>
  </div>
</template>

<script>
import { Utils} from 'weex-ui';
export default {
    components: {
        Utils
    },
    data() {
        return {
            data:{},
            locationX:'',
            locationY:'',
            cName:'',
            src:'',
        }
    },
    methods: {
        
    },
    created(){
        const tabPageHeight = Utils.env.getPageHeight()
        const containerHeight = tabPageHeight
        this.webStyle ={ height: containerHeight + 'px',width:750+'px'}

        this.$router.getParams().then(resData => {
            this.data = resData.data
            this.locationX = this.data.locationX
            this.locationY = this.data.locationY
            this.cName = this.data.cName
            this.cName =  encodeURI(encodeURI(this.data.cName));  
            this.src = `https://uri.amap.com/marker?position=${this.locationX + ',' + this.locationY}&name=${this.cName}`
            // this.src = 'https://uri.amap.com/marker?position=121.287689,31.234527'
            // this.src = 'http://www.baidu.com?name=你好'
        })
    },
    
}
</script>

<style scoped>

</style>
